package demo.com.heq.dao;

import demo.com.heq.entity.DetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author heq
 * @Date 2023/2/17 11:50
 * @Description 消费明细
 */
@Mapper
public interface DetailMapper {
    /**
     * 添加一条消费明细
     * @param detailEntity 用户
     */
    void addDetail(DetailEntity detailEntity);

    /**
     * 根据用户id查询所有明细
     * @param userId 用户id
     * @return
     */
    List<DetailEntity> getDetails(int userId);
}
